package com.tqjc.execute.work;


import com.tqjc.area.entity.Roller;
import com.tqjc.area.entity.SteelPlate;
import com.tqjc.area.entity.Stock;
import com.tqjc.execute.task.entity.Task;
import com.tqjc.execute.task.entity.TaskApart;
import com.tqjc.execute.utils.PublicResult;
import com.tqjc.execute.utils.Step;
import org.apache.poi.ss.formula.functions.T;

import java.util.List;

/**
 * @Description: 天车工作接口
 * @author: pzy
 * @date: 2023年05月19日 10:13
 */
public interface CraneWork {


    /**
     * create by: pzy
     * description: 设置工作标志位，控制工作启停
     * create time: 2023/5/19 11:16
     *
     * @return void
     * @param: [startLogo]
     */
    public void setStartLogo(Boolean startLogo);

    public void setCraneStatus(int craneStatus);
    public void setSemiAutoNowStep(int semiAutoNowStep);

    public void setSemiAutoRunFlag(Boolean semiAutoRunFlag);

    /**
     * create by: pzy
     * description: 获取当前工作标志位
     * create time: 2023/5/19 11:16
     *
     * @return void
     * @param: [startLogo]
     */
    public boolean getStartLogo();

    public int getCraneStatus();

    public boolean getSemiAutoRunFlag();

    public int getSemiAutoNowStep();

    public PublicResult<TaskApart> getSemiAutoNowStepBean(int nowStep);
    /**
     * create by: pzy
     * description: 获取当前的工作天车编号
     * create time: 2023/5/19 11:16
     *
     * @return java.lang.String
     * @param: []
     */
    public String getCraneType();

    public void setStockNo(String stockNo);

    public String getStockNo();

    public void setStockPlaceNumber(int stockPlaceNumber);

    public int getStockPlaceNumber();

    public void setIsSteelNoChecked(Boolean isSteelNoChecked);

    public Boolean getIsSteelNoChecked();

    public void setSteelNoUpdated(String  steelNoUpdated);

    public String  getSteelNoUpdated();

    public void setIsSteelInfoChecked(Boolean isSteelInfoChecked);

    public Boolean getIsSteelInfoChecked();

    public void setSteelInfoWrite(SteelPlate steelInfoWrite);

    public SteelPlate getSteelInfoWrite();


    /**
     * create by: pzy
     * description: 开始工作任务
     * create time: 2023/5/19 11:43
     *
     * @return void
     * @param: []
     */
    public void stopWork();


    /**
     * @param :
     * @return void
     * @author Patienyon
     * @description 停止工作任务
     * @date 2023/6/12 11:24
     */
    public PublicResult startWork();

    public PublicResult move1();

    public PublicResult suck2();

    public PublicResult move3();

    public PublicResult place4();

    /**
     * @param sheetNumber:
     * @return void
     * @author Patienyon
     * @description 多版任务启动
     * @date 2023/6/14 10:23
     */
    public PublicResult startWork(Integer sheetNumber);


    /**
     * create by: pzy
     * description: 获取当前的工作任务对象
     * create time: 2023/5/19 11:46
     *
     * @return com.tqjc.execute.task.entity.Task
     * @param: []
     */
    public Task getCraneTask(int steelNum2Suck) throws Exception;

    /**
     * create by: pzy
     * description: 判断当前执行任务的前置工作条件
     * create time: 2023/5/19 15:46
     *
     * @return com.tqjc.execute.utils.PublicResult
     * @param: []
     */
    public PublicResult checkPostWorkCondition();

    public PublicResult checkNowStepAndIsHelp(int nowStep);

    public PublicResult checkIsSuckedSteel();
    /**
     * create by: pzy
     * description: 根据辊道信息查询适合的堆放位
     * create time: 2023/5/25 14:37
     *
     * @return java.util.List<com.tqjc.area.entity.Stock>
     * @param: [roller]
     */
    public List<Stock> getOfflineReadyStockByRoller(Roller roller);


    //

    /**
     * create by: pzy
     * description: 钢板到位时获取吸取钢板的高度
     * create time: 2023/5/25 14:50
     *
     * @return java.lang.Integer
     * @param: [roller]
     */
    public Integer getHeightWhenSteelReady(Roller roller);

    /**
     * create by: pzy
     * description: 获取库存区高度
     * create time: 2023/5/25 14:50
     *
     * @return java.lang.Integer
     * @param: [roller]
     */
    public Integer getHeightStock(Stock stock);

    public int updateSteelPlatesInStockByRoller(Roller roller);

    public int updateSteelPlatesInStockByCrane(String crane);


    /**
     * create by: pzy
     * description: 根据任务获取步骤
     * create time: 2023/5/25 16:45
     *
     * @return com.tqjc.execute.utils.PublicResult<java.util.List < com.tqjc.execute.task.entity.TaskApart>>
     * @param: [task]
     */
    public PublicResult<List<TaskApart>> getStepsByTask(Task task);








    /**
     * create by: pzy
     * description: 获取当前正在运行的线程
     * create time: 2023/5/25 16:46
     *
     * @param: []
     * @return java.lang.Runnable
     */
    public Runnable getNowThread();


    /**
     * create by: pzy
     * description: 设置当前正在运行的线程
     * create time: 2023/5/25 16:46
     *
     * @param: []
     * @return java.lang.Runnable
     */
    public void setNowThread(Runnable runnable);


    void startAlign(String craneType);


    public SteelPlate getSteelInfo(Roller roller);

    public SteelPlate getFrontPageSteelInfo();

    public void setCraneInfoMsg(String msg);

    PublicResult doAction(int step);

    void startEasyPlace(String craneType);

    public int getSuckedSteelNum();


    public void setSuckedSteelNum();
}
